<template>
	<view class="box" hover-class="box1">
		测试文本1
	</view>
	<view>------</view>
	<text selectable="true">测试文本2</text>
	<view>------</view>
	<view>
		<button @click="buttonClick">{{txt}}</button>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	const txt = ref("测试文本3");

	function buttonClick() {
		txt.value = "测试文本4"

	}
</script>

<style lang="scss">
	.box {
		width: 100px;
		height: 100px;
		background: #ccc;
	}

	.box1 {
		background: red;
	}
</style>